package org.jeecg.modules.demo.crm.service.impl;

import org.jeecg.modules.demo.crm.entity.CProjectHeadQuotes;
import org.jeecg.modules.demo.crm.mapper.CProjectHeadQuotesMapper;
import org.jeecg.modules.demo.crm.service.ICProjectHeadQuotesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

/**
 * @Description: 总项目报价表
 * @Author: jeecg-boot
 * @Date:   2025-06-19
 * @Version: V1.0
 */
@Service
public class CProjectHeadQuotesServiceImpl extends ServiceImpl<CProjectHeadQuotesMapper, CProjectHeadQuotes> implements ICProjectHeadQuotesService {


    @Autowired
    CProjectHeadQuotesMapper cProjectHeadQuotesMapper;
    @Override
    public void install(CProjectHeadQuotes cProjectHeadQuotes) {
       // List<CProjectHeadQuotes> projectHeadQuotesList = cProjectHeadQuotesMapper.findByProjectHead(cProjectHeadQuotes.getProjectId());
       /* for (CProjectHeadQuotes quotes : projectHeadQuotesList) {
            quotes.setStatus("失效");
            cProjectHeadQuotesMapper.updateById(quotes);
        }*/
        //cProjectHeadQuotes.setStatus("审核中");
        cProjectHeadQuotesMapper.insert(cProjectHeadQuotes);

    }
}
